| |
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
I want to work on replacing the redundant font tags in the templates with some basic css that reads the styles set in the style template and uses those values for the fonts. Here's what I've done so far: In public_common.pl, I've set the css to look like this: I've then went through and replaced all : with
There are >300 instances of just this one set of tags in the templates - bandwidth and download speed should improve...
My problem is that the pages do not seem to be picking up on these styles, as the text sizes are bigger than specified... ideas? Is it because the ubb uses size="2" instead of pixels or x-small?
I am using IE6 to view the results...
|
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
You can use pixels (like 80pt), percents (like 80%) or x-small/etc..
[ September 03, 2001: Message edited by: LK ]
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
and there lies the rub, since ubb uses 1, 2, and 3 everywhere, it's not gonna be a matter of just reading the already set values in the styles... ah well... it's just one extra step... should make a nice difference in download speed and bandwidth improvement. I'll add this as part of the xhtml templates or seperately but with using xhtml templates as the base 
|
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
BTW, I don't think Xpts are CSS v1.0 validated.
|
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
80pt would be 80 points, not 80 pixels.  But in response to Allen's initial question, CSS and HTML font sizes are not the same. CSS needs the number to be accompanied by a unit, and 10pt is roughly a 2 in HTML sizing.
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
hmmmm... thanks, both of ye... that explains the ugly I was seeing Close?: 1 == 8pt == xx-small 2 == 10pt == x-small 3 == 12pt == small Gonna read a little more at ALA, they had some weird stuff going on to make it appear the same in most all browsers... I'll distribute the templates with the css manually set, maybe in the future include a control panel add-on that allows you to set it from the cp.
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
more... can I mix css class with other tags?
example... I have a a good number of fonts set that are exactly alike except they give a different text color... can I do something like:
Or do I need a different css class set for each font tag that uses a different color?
|
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
without that COLOR part Also, I think STRICT means , if you want it to be validated.
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
I didn't give up on this (and you thought I was taking a long time on the portal  ) - I started css'ing the templates for 6.3 and am seeing a ~10% savings in file size which should translate into a significant gain in bandwidth savings. They should be ready when 6.3 goes final 
|
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
Can you post the CSS you're currently working with? I hope it's not the same as what you posted back in the first post of this thread... 
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
hehe check the thread in the dev forum for more details. will post it publicly as there is more to post 
|
|
|
|
|
Joined: Apr 2002
Posts: 111
Member
|
|
Member
Joined: Apr 2002
Posts: 111 |
Not using 6.3, but I did the same thing for UBB6.05 a couple of weeks ago. Difference being is that I've made it an external stylesheet, and it replaces UBB's "Templates", so you configure everything in the stylesheet. Anyway, our stylesheet looks like this [code][/code]The whole template updating took me probably around 5 hours in total to modify. I would make a hack out of it, but it does require a lot of intelligence when installing other hacks, to make sure they comply with the stylesheet. Allen, If you want, I can email you our highly modified templates, so you can use them to compare with, to make sure you get all the sections updated. As far as I can tell i've covered all areas with it Cheers Ben/PF
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
thanks, it looks good I'll be using 6.3's templates, which are a good bit different from 6.05's in some places, not so bad in others. I'll also be using ubb.threads' css naming scheme with a bit simpler .css file than yours - it'll help tremendously for those switching from one to another and it's one a lot of people (including me  ) are used to, I know what's where Once I start posting the template files publicly, I would value your input tho, when you have time 
|
|
|
|
|
Joined: Aug 2000
Posts: 874
Moderator / Developer
|
|
Moderator / Developer
Joined: Aug 2000
Posts: 874 |
quote: Originally posted by AllenAyres: more... can I mix css class with other tags?
example... I have a a good number of fonts set that are exactly alike except they give a different text color... can I do something like:
Or do I need a different css class set for each font tag that uses a different color?
in case you never got this answered, afaik the proper way to go about overriding is like so:
but then i was always under the impression that if you are setting font styles with the td css definitions you do not need any tag at all...
|
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
jordo: that code looks good; glad to see you know about how the "cascade" in cascading style sheets works. Allen: use tags instead for doing that.
|
|
|
|
|
Joined: Mar 2000
Posts: 21,080 Likes: 3
I type like Navaho
|
|
I type like Navaho
Joined: Mar 2000
Posts: 21,080 Likes: 3 |
thanks both of you 
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 253
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,824
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 413
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 21
|
|
|
|
|
|
|
|